﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace counter1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            String s = "", opr = "";
            int num1 = 0, num2 = 0,res = 0;
            Console.WriteLine("Please enter two numbers(seperated by;): ");
            s = Console.ReadLine();
            num1 = int.Parse(s.Split(';')[0]);
            num2 = int.Parse(s.Split(';')[1]);
            Console.WriteLine("Please enter the operation you need(+,-,*,/): ");
            opr = Console.ReadLine();
            switch (opr)
            {
                case "+":
                    res = num1 + num2;
                    break;
                case "-":
                    res = num1 - num2;
                    break;
                case "*":
                    res = num1 * num2;
                    break;
                case "/":
                    if(num2 == 0)
                    {
                        Console.WriteLine("The second number can't be 0. ");
                        return;
                    }
                    else
                    res = num1 / num2;
                    break;
                default:
                    Console.WriteLine("This operation is not avalible.");
                    break;

            }
            Console.WriteLine("The answer is: "+res);
            Console.Read();
        }
    }
}
